import mockjs from 'mockjs';

export default {
  'GET /demo/getRoleList': mockjs.mock({
    'data|15': [{
      'id': '@increment(100)',
      'name': '@name()',
      'role|1': [
        'admin',
        'guest',
      ],
    }]
  }),
  'GET /demo/getRoleTypes': mockjs.mock({
    'roles|2': [{
      'id': '@increment(10)',
      'name|1': [
        'admin',
        'guest',
      ],
    }]
  }),
  'GET /demo/getMenus': mockjs.mock({
    'data':  [
      {
        path: '/permission',
        name: '权限配置',
        icon: 'dashboard',
        children: [
          {
            path: '/permission/user',
            name: '用户列表',
            exact: true,
            button: [
              {name: '新增', id: 1},
            ]
          },
          {
            path: '/permission/role',
            name: '角色列表',
            exact: true,
            button: [{name: '授权', id: 11}]
          },
          {
            path: '/permission/authentic',
            name: '权限列表',
            exact: true,
            button: [
              {name: 'add', id: 13},
              {name: '菜单权限', id: 31},
              {name: '按钮权限', id: 32},
              {name: '功能权限', id: 33},
            ]
          },
          {
            path: '/permission/menu',
            name: '菜单列表',
            exact: true,
            button: [{name: '新增', id: 3}]
          },
          {
            path: '/permission/button',
            name: '按钮列表',
            exact: true,
            button: [{name: '新增', id: 12}]
          },
          {
            path: '/permission/operation',
            name: '功能管理',
            exact: true,
            button: [{name: '新增', id: 2}]
          },
        ],
      }
    ]
  })
}